/******************************************************************************
 *                                                                            *
 *               (c) 2008-2009 HutLab. All rights reserved.                   *
 *                        Eduardo Henrique Leite                              *
 *                                                                            *
 ******************************************************************************

 History:
 Created 03/01/2009

 */

package hutlab.sudoku.engine.ui;

/**
 * Sudoku Cell display class.
 */
public class SudokuBoardCell {

    // ----- FIELDS -----

    private int mValue;
    private boolean mConflict;
    private boolean mGenerated;
    private boolean mSelected;
    private boolean mSuggested;

    // ----- GETTERS -----

    /**
     * Returns cell's value.
     */
    public int getValue(){
        return mValue;
    }

    /**
     * Returns cell's conflict state.
     */
    public boolean getConflict(){
        return mConflict;
    }

    /**
     * Returns whether cell was generated.
     */
    public boolean getGenerated(){
        return mGenerated;
    }

    /**
     * Returns whether cell was selected.
     */
    public boolean getSelected(){
        return mSelected;
    }

    public boolean getSuggested(){
        return mSuggested;
    }

    // ----- SETTERS -----

    /**
     * Sets cell's value.
     */
    public void setValue(int value){
        mValue = value;
    }

    /**
     * Sets cell's conflict state.
     */
    public void setConflict(boolean conflict){
        mConflict = conflict;
    }

    /**
     * Sets cell's generated flag.
     */
    public void setGenerated(boolean generated){
        mGenerated = generated;
    }

    /**
     * Sets cell's selected flag.
     */
    public void setSelected(boolean selected){
        mSelected = selected;
    }

    public void setSuggested(boolean suggested){
        mSuggested = suggested;
    }
    // ----- CONSTRUCTOR -----

    /**
     * Creates a new SudokuBoardCell object.
     */
    public SudokuBoardCell(){
        this.mValue = 0;
        this.mSelected = false;
        this.mGenerated = false;
        this.mConflict = false;
        this.mSuggested = false;
    }

    /**
     * Creates a new SudokuBoardCell object.
     */
    public SudokuBoardCell(int value){
        this.mValue = value;
        this.mSelected = false;
        this.mGenerated = true;
        this.mConflict = false;
        this.mSuggested = false;
    }

    /**
     * Creates a new SudokuBoardCell object.
     */
    public SudokuBoardCell(int value, boolean selected, boolean generated){
        this.mGenerated = generated;
        this.mSelected = selected;
        this.mValue = value;
        this.mConflict = false;
        this.mSuggested = false;
    }
}
